package org.tarena.dang.service;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.tarena.dang.dao.productDAO;
import org.tarena.dang.dao.impl.ProductDAOImpl;
import org.tarena.dang.entity.Product;


public class ProductServiceImp implements ProductService {
	productDAO dao = new ProductDAOImpl();
	@Override
	public List<Product> findNewPros(int topSize) throws SQLException {
		List<Product> list = new ArrayList<Product>();
		list = dao.findNewProduct(topSize);
		System.out.println("最新上架list的大小："+list.size());
		return list;
	}
	
}
